import numpy as np

a = np.array([
    [
        ['a', 'b'],
    	['c', 'd']],[
        ['e', 'f'],
    	['g', 'h']
    ]
]).reshape(2,2,2)
print(a)
# 转换前a000  b001  c010  d011
#      e100  f101  g110   h111

# 猜想转换后a000  b010   c001  d011
#         e100  f110   g101   h111
b = np.rollaxis(a,2,1)
print(b)

print(np.where(a == 'f'))
print(np.where(b == 'f'))
print(np.where(a == 'g'))
print(np.where(b == 'g'))